#include <bits/stdc++.h>
// 2025/03/16
// tag: 
// Author: Forever
using namespace std;

using int64 = int64_t;
#pragma GCC -Ofast
int t, n, cnt1, cnt2, a[200005], mi[2], ma[2];

void solve(){
    int cnt = 0, stop = 0;
    for (int i = 1; i <= n; i++) {
        if (a[i] == a[i - 1])
            cnt++;
        else
            cnt = 1;
        if (cnt == 2)
            mi[cnt1] = a[i], cnt1++, cnt = 0;
        if (cnt1 == 2){
            stop = i;
            break;
        }
    }
    cnt = 0;
    for (int i = n; i > stop; i--) {
        if (a[i] == a[i + 1])
            cnt++;
        else
            cnt = 1;
        if (cnt == 2)
            ma[cnt2] = a[i], cnt2++, cnt = 0;
        if (cnt2 == 2)
            break;
    }
    if (cnt1 != 2 || cnt2 != 2) {
        cout << "NO" << endl;
        return;
    }
    cout << "YES" << endl;
    cout << mi[0] << " " << mi[1] << " " << mi[0] << " " << ma[0] << " " << ma[1] << " " << mi[1] << " " << ma[1] << " " << ma[0] << endl;
}

signed main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    cin >> t;
    while (t--){
        cin >> n;
        for (int i = 1; i <= n; i++)
            cin >> a[i];
        sort(a + 1, a + n + 1);
        a[0] = INT_MIN, a[n + 1] = INT_MAX;
        cnt1 = cnt2 = 0;
        solve();
    }
    return 0;
}